<!DOCTYPE html 
	PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title><?= htmlspecialchars($this->title) ?></title>
	<link rel="stylesheet" type="text/css" href="<?php echo $path ?>SimpleRecord.css" />
	<script type="text/javascript" src="<?php echo $path ?>mootools.v1.11.js"></script>
	<script type="text/javascript" src="<?php echo $path ?>SimpleRecord.js"></script>
</head>

<body>

<div class="section">
	<h1><?php echo htmlspecialchars($this->title) ?></h1>
	<a href="?edit" class="func_link">edit</a>
</div>

<div><?php echo $pageContentFormatted ?></div>

<div class="section">
	<h1>Page History</h1>
	<script type="text/javascript">
	// <![CDATA[
	document.write('<div class="func_link" id="history_toggler" onclick="return toggleHistory()">show</div>');
	// ]]>
	</script>

	<ul id="history">
		<?php foreach($this->record->getChangeTimes('Y-m-d H:i:s') as $idx => $time): ?>
			<li><a href="<?php echo htmlspecialchars(basename($_SERVER['PHP_SELF'])) ?>?<?php echo $idx ?>"><?php echo htmlspecialchars($time) ?></a></li>
		<?php endforeach ?>
	</ul>

	<script type="text/javascript">
	/* <![CDATA[ */ $('history').style.display = 'none'; // ]]>
	</script>
</div>

</body>
</html>
